package com.pojo;

public class Student {
    /*私有化构造器*/
    private Student() {
    }

    /*提供一个静态内部类*/
    private static class StudentHelper {
        private static Student student = new Student();
    }

    /*提供一个对外获取单例对象的方法*/
    public static Student getStudent() {
        return StudentHelper.student;
    }
}
